package org.familysearch.fsapi.gwt.server.test;

import junit.framework.TestCase;

import org.familysearch.fsapi.gwt.common.Logger;
import org.familysearch.fsapi.gwt.common.client.entities.Person;
import org.familysearch.fsapi.gwt.server.api.APIException;
import org.familysearch.fsapi.gwt.server.api.PersonAPI;

public class PersonSAXParserTestCase extends TestCase {

	private Logger log;
	private PersonAPI api = new PersonAPI();
	
	public PersonSAXParserTestCase()
	{
		log = Logger.getLogger(this.getClass().getName());
	}

    public void test_personToString()
    {
    	Person person = new Person();
    	assertNotNull(person);
    	log.debug(person);
    }
     
    public void test_getPersonById()
    {
    	
    	Person p = new Person();
    	p.setId("me");
    	
    	Person f = null;
    	try {
			f = api.getPerson(p);
		} catch (APIException e) {
			log.error(e.toString());
		}
		
		assertNotNull(f);
		log.debug(f);
    	
    }    

	
    
}
